﻿@using Emoney.UserTraining.Model;

@{
    Layout = null;
}
@{
    List<Traning_MeetingType> lst = ViewBag.MTypeLst;
    var typename = "";
    var id = "";
    if (lst.Count > 0)
    {
        id = lst[0].id.ToString();
        typename = lst[0].meetingType;
    }
    }
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    <link href="~/css/StyleMeeting.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.7.1.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btn_Save").click(function () {
                var meetingType = $("#meetingType").val();
                if (meetingType == "") {
                    alert("会议类型不能为空");
                    $("#meetingType").focus();
                    return false;
                }
                $.ajax({
                    type: "POST",
                    async: false,
                    url: "AddMeetingType",
                    data: { meetingType:escape(meetingType),id:"@id" },
                    success: function (msg) {
                        alert(msg);
                        window.location.href = "../Temporary/MeetingTypeList";
                    },
                    beforeSend: function () {
                    },
                    complete: function () {
                        //$("#loadingImg").remove();
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        //alert(XMLHttpRequest.status);
                    }
                });
            });
        });
    </script>
</head>
<body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-right: #6699ff 1px solid; border-top: #6699ff 1px solid; border-left: #6699ff 1px solid; width: 100%; border-bottom: #6699ff 1px solid; height: 52px; background-color: White">
        <tr>
            <td width="597" height="45" valign="bottom" class="tab_bg">
                <ul id="tab">
                    <li class="current"><a>会议类型维护</a></li>
                </ul>
            </td>
            <td width="183" height="30" align="right" class="date tab_bg"></td>
        </tr>
        <tr id="biaoqian1">
            <td colspan="2" class="warperborder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30" class="boredr_b table_td  fb_">&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="warper_pb">
                            <table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="200" height="30" align="right">会议类型:
                                    </td>
                                    <td colspan="2" class="pl5">
                                        
                                        <input id="meetingType" type="text" style="width: 335px;" value="@typename" />
                                        <span class="r">*</span>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="31" colspan="2">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="table_bl"></td>
                        <td align="center" class="table_cb">&nbsp;&nbsp;
                            <input type="button" value="添加" class="button1" id="btn_Save" />
                        </td>
                        <td class="table_br" style="width: 150px"></td>
                        <td class="table_br"></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
